<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>文章管理</title>
</head>
<body>
	<center>
		<h2>
			☆欢迎-<span style="color: red">${loginuser.loginusername }</span>-进入新闻发布系统☆
		</h2>
		<s:debug></s:debug>
		<s:form action="add" method="get">
			<s:textfield name="title" label="标题" style="width:300px" />
			<br />
			<s:textarea name="content" label="内容 "
				style="width:300px;height:300px;resize:none" />
			<br />
			<s:file name="picture" label="上传图片"/><br/>
			<!-- 因为我在dao层写的有参构造是传的loginuser对象，所以我在这写的name=loginuser.loginuserid -->
			<s:textfield name="loginuser.loginuserid"
				value="%{#attr.loginuser.loginuserid}" label="作者编号"
				style="width:50px" readonly="true" />
			<s:textfield name="loginuser.loginusername"
				value="%{#attr.loginuser.loginusername}" label="作者姓名"
				style="width:100px" readonly="true" />
			<s:select list="#{'1':'管理员','2':'普通员工','3':'店长'}" listKey="key"
				listValue="value" name="type.list" label="新闻分类" />
			<s:submit value="提交" style="width:300px" />
		</s:form>
	</center>
</body>
</html>